<template>
	<view class="header">
		<view class="cont">
			<image class="back" @click="back" src="@/static/static/back.png" mode="widthFix"></image>
			<view class="title">
				<image class="back" src="@/static/static/menu.png" mode="widthFix"></image>
				<text>{{webtext}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			webtext:{ //参数名
				type:String, //参数名
			}
		},
		data() {
			return {
			};
		},
		methods:{
			back(){
				if(this.webtext == "登录"){
					// 有问题要做处理
					if(uni.getStorageSync('Authorized')){
						uni.switchTab({
							url:"/pages/mine/index"
						})
					}
				} else{
					uni.navigateBack()
				}
			}
		}
	};
</script>

<style scoped>
	.header{
		height: 88upx;
		padding: 0 20upx;
		display: flex;
		align-items: center;
		background-color: #151936;
	}
	.back{
		width: 36upx;
	}
	.cont{
		width: 100%;
		height: 40upx;
		display: flex;
		align-items: center;
	}
	.cont .title{
		border-left: 4upx solid #acacb3;
		display: flex;
		align-items: center;
		margin-left: 26upx;
	}
	.cont .title image{
		margin: 0 26upx;
	}
	.cont .title text{
		color: #fff;
		font-size: 28upx;
	}
</style>
